<?php
/**
 * EGP Framework
 *
 * LICENSE
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author     Akon(番茄红了) <aultoale@gmail.com>
 * @copyright  Copyright (c) 2008 (http://www.tblog.com.cn)
 * @license    http://www.gnu.org/licenses/gpl.html     GPL 3
 */

!defined('EGP_LIB_DIR') && die('Access Deny!');

/**
 * 项目配置文件
 *
 * @package    config
 * @author     Akon(番茄红了) <aultoale@gmail.com>
 * @copyright  Copyright (c) 2008 (http://www.tblog.com.cn)
 * @license    http://www.gnu.org/licenses/gpl.html     GPL 3
 */
return array (
    'baseSite' => 'http://www.egp.foo/',
    'session' => array(
        'name' => 'EGP_SID', //Session Name
        'path' => EGP_TMP_DIR . '/.session', //Session 存储路径
        'lifetime' => 86400,
        'domain' => 'egp.foo',
    ),
    'cache' => array (
        'adapter' => 'file', //缓存适配器
        'config' => array ('cacheDir' => EGP_TMP_DIR . '/.cache'),
//        'adapter' => 'memcached', //缓存适配器
//        'config' => array (
//            'lifeTime' => '7200', //缓存生存周期(秒)
//            'compression' => 'false', //是否启用压缩
//            'servers' => array (
//                'host' => '127.0.0.1', //Memcached 服务器
//                'port' => '11211', //Memcached 通信端口
//                'persistent' => '1',//是否使用持久连接
//            ),
//        ),
    ),
    'db' => array (
        'adapter' => 'mysql', //数据库适配器
        'config' => array (
            'host' => 'localhost:3306', //主机名:端口
            'dbname' => 'egp_foo', //数据库名
            'username' => 'root', //用户名
            'password' => '123456', //密码
            'charset' => 'utf8', //数据库编码
            'prefix' => 'egp_', //表名前缀
        ),
    ),
    'hosts' => array( //主机名配置
        'www.egp.foo' => 'default',
        'admin.egp.foo' => 'admin',
    ),
    'captcha' => array(
        'driver' => 'basic',
        'options' => array(
            'length' => mt_rand(4, 6), //字符长度
            'width' => 120, //图片宽度
            'height' => 40, //图片高度
            'fontDir' => EGP_CFG_DIR . '/fonts', //字体目录
            'fonts' => array(), //可随机应用的字体 (空则使用所有)
            'imgDir' => EGP_WEB_DIR . '/images/captcha',
            'imgUrl' => '/images/captcha',
            'imgAlt' => '',
        )
    ),
    'upload' => array(
        'basePath' => EGP_WEB_DIR . '/uploads', //上传基本目录
        'maxSize' => 0, //KB
        'allowExtension' => array( //允许上传的文件格式
            'JPG', 'jpeg', 'bmp', 'wbmp', 'gif', 'png',
            'rar', 'zip', 'gz', '7z', 'bzip', 'iso',
            'txt'
        ),
        'rename' => true, //是否重命名
    ),
    'thumb' => array(
        'basePath' => EGP_WEB_DIR . '/thumb', //缩略图存放目录
    ),
);